/***********************************************************************
    filename:   DaterLoginWindow.h
    created:    10/4/2012
    author:     4Ys

    purpose:    Defines class for LoginWindow objects in UI
*************************************************************************/
#ifndef _DaterLoginWindow_h_
#define _DaterLoginWindow_h_

#include "cegui.h"
#include "Dater.h"
#include "DaterBaseWindow.h"
#include "DaterClientSocket.h"

class LoginWindow : public BaseWindow 
{
	/* !
	\brief
		The Login Window.
	*/
public:
		/* !
		\brief
			Construct the sample of class LoginWindow.

		\param id_name
			- a string to represent the prefix of the window.
			
		\param theApp
			- point to main process.
			
		\param parent
			- point to parent window.
		*/
	LoginWindow(const CEGUI::String& id_name, DaterApp* theApp, CEGUI::Window* parent = 0);
		
		/* !
			Destructor of class LoginWindow.
		*/
	virtual ~LoginWindow();

		/* !
		\brief
			a virtual function generated from class BaseWindow to show window.
		*/
	virtual void showWindow();
	
		/* !
		\brief
			a virtual function generated from class BaseWindow to hide window.
		*/
	virtual void hideWindow();

	void enterDater(Dater::ClientSocket*);

private:
		/* !
		\brief
			Handle the process and close button in the window.
			
		\param args
			- the processing program.
		*/
	bool handle_CloseButton(const CEGUI::EventArgs& args);

		/* !
		\brief
			Handle the process and register.
			
		\param args
			- the processing program.
		*/
	bool handle_Register(const CEGUI::EventArgs& args);

		/* !
		\brief
			Handle the process and submit.
			
		\param args
			- the processing program.
		*/
	bool handle_Submit(const CEGUI::EventArgs& args);

	DaterApp* _theApp;
};

#endif